﻿Public Class Form5


    Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'Test4DataSet.tbl_thu' table. You can move, or remove it, as needed.
        Me.Tbl_thuTableAdapter.Fill(Me.Test4DataSet.tbl_thu)
        Me.Tbl_testTableAdapter.Fill(Me.Test4DataSet.tbl_test)
        Me.Tbl_testIUltraGrid.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_test, Me.Tbl_testBindingSource, Me.Tbl_testTableAdapter, Me.Test4DataSet)
        ''Me.Tbl_testIUltraGrid.setCapNhatDuLieuTucThoi()
        'Me.Tbl_testIUltraGrid.setCotBatLoi("ghichu")
        Dim ht As Hashtable = New Hashtable
        ht.Add("ma", "ma")
        ht.Add("ten", "ten")
        Me.Tbl_testIUltraGrid.setThemIUltraDropDown(Me.Tbl_thuIUltraDropDown, Me.Test4DataSet.tbl_thu, ht)
        Me.Tbl_thuIUltraDropDown.setGiaoDien()
        Me.Tbl_testIUltraGrid.setGiaoDienVua()
        Me.Tbl_testIUltraGrid.setMacDinh("ngay", "12/12/2012")
        Me.IUltraGrid1.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_thu, Me.Tbl_thuBindingSource, Me.Tbl_thuTableAdapter, Me.Test4DataSet)
        'Me.IUltraGrid1.setCotBatLoi("ghichu")
        Me.IUltraGrid1.setGiaoDienVua()
        Me.Tbl_testIUltraGrid.setFocusCellUltraGrid("ghichu", Me.IUltraGrid1)
        Me.Tbl_testIUltraGrid.setCapNhatDuLieuTucThoi()

    End Sub

    Private Sub UltraButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton1.Click
        Me.Tbl_testIUltraGrid.getTaoMoi()
    End Sub

    Private Sub btnLuu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLuu.Click
        Me.Tbl_testIUltraGrid.getLuu()
    End Sub

    Private Sub UltraButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton2.Click
        Me.Tbl_testIUltraGrid.getXoa()
    End Sub

    Private Sub UltraButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton4.Click
        Me.Dispose()
        Me.Close()
    End Sub

    Private Sub Tbl_testIUltraGrid_AfterCellActivate(sender As Object, e As System.EventArgs) Handles Tbl_testIUltraGrid.AfterCellActivate
     
    End Sub
End Class